package com.wsoft.hr.pm.manager;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wsoft.hr.pm.entity.HrPmMemberTemplateScopeEntity;
import com.wsoft.hr.pm.mapper.HrPmMemberTemplateScopeMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author z001
 * @Date 2025年02月17日 15:06:35
 */
@Slf4j
@Service
public class HrPmMemberTemplateScopeManager extends ServiceImpl<HrPmMemberTemplateScopeMapper, HrPmMemberTemplateScopeEntity> {



    /**
     * 根据模版id 获取信息
     * @param memberTemplateId
     * @return
     */
    public List<HrPmMemberTemplateScopeEntity> getByMemberTemplateId(Long memberTemplateId) {
        QueryWrapper<HrPmMemberTemplateScopeEntity> query = new QueryWrapper<>();
        query.lambda().eq(HrPmMemberTemplateScopeEntity::getMemberTemplateId,memberTemplateId);
        return list(query);
    }

    /**
     * 根据模版ids 获取信息
     * @param memberTemplateIds
     * @return
     */
    public List<HrPmMemberTemplateScopeEntity> getByMemberTemplateIds(List<Long> memberTemplateIds) {
        QueryWrapper<HrPmMemberTemplateScopeEntity> query = new QueryWrapper<>();
        query.lambda().in(HrPmMemberTemplateScopeEntity::getMemberTemplateId,memberTemplateIds);
        return list(query);
    }
}
